/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.service;

import cz.muni.dto.TarrifDTO;
import cz.muni.entities.Tarrif;
import java.util.List;
import javax.ejb.Local;

/**
 *
 * @author Thomas
 */
@Local
public interface TarrifServiceLocal {
    
    /**
     * Saves entity t to database
     * 
     * @param TarrifDTO entity to be saved
     * 
     */
    void create(TarrifDTO tarrif);

    /**
     * Deletes entity t from database
     * 
     * @param TarrifDTO Entity to be deleted
     * @throws Exception when:
     *         - entity t is not found in database
     */
    void delete(TarrifDTO tarrif);

    /**
     * Finds and returns entity with id
     * 
     * @param Long ID of the entity
     * @return Found entity or null
     * @throws Exception when:
     *         - parameter t is not of type Long
     */
    TarrifDTO find(Long id);

    /**
     * Updates entity t
     * 
     * @param TarrifDTO Entity to be updated
     * @return Updated entity
     */
    TarrifDTO update(TarrifDTO tarrif);
    
    /**
     * Finds and returns all Tarrif entities
     * 
     * @return List of all Tarrif entities found in the database
     */
    List<TarrifDTO> findAll();
}
